<template>
  <view class="action-rule-layout">
    <my-header title="操作规则"></my-header>
    <my-content class="content">
      <rich-text :nodes="privacyData" class="privacy"></rich-text>
    </my-content>
  </view>
</template>

<script>
import api from '../../api'

export default {
  data() {
    return {
      privacyData: '',
    }
  },
  onLoad() {
    this.getContent()
  },
  onShow() {

  },

  methods: {
    getContent() {
      uni.showLoading({
        title: '数据加载中',
      })
      api.contents.show('action_rule').then(res => {
        if (res.code === 200) {
          uni.hideLoading()
          this.privacyData = res.data.content
        }
      }).catch(error => {
        console.log(error)
      })
    },
  },
}
</script>

<style lang="scss" scoped>
.action-rule-layout {
  width: 100%;
  min-height: 100vh;
  background-color: #141414;
  box-sizing: border-box;
  padding: 20rpx;
  color: white;

  .content {
    height: 100%;
    width: 100%;
  }
}
</style>